package myspring.event;

import org.springframework.context.ApplicationListener;

/**
 * <pre>
 *   Title: EmailNotifier.java
 *   Description: 
 *   Copyright: yundaex.com Copyright (c) 2013
 *   Company: 上海韵达货运有限公司
 * </pre>
 * 
 * @author liuzhaoqing
 * @version 1.0
 * @date 2014年10月28日
 */
public class EmailNotifier implements ApplicationListener<EmailEvent>{

	public void onApplicationEvent(EmailEvent event) {
		if (event instanceof EmailEvent) {
			System.out.println(event.getAddress() + ":" );
			System.out.println(event.getText() + ":" );
		} else {
			System.out.println(event);
		}
	}

}
